test(e2e): W2 LIVE anon provision coverage for all 7 resource flows#171
Merged
Conversation
Extends the WS1-P1 LIVE real-backend harness (PR #170) to cover every anonymous resource-provision flow end-to-end against the real api: vector/cache/nosql/queue/storage/webhook (db is already covered by live-provision-smoke.spec.ts). - e2e/live-anon-provision.spec.ts: registry-driven (rule 18) one test per service. Asserts POST /S/new -> 201, usable connection_url/receive_url matching the per-service scheme (postgres/redis/mongodb/nats/s3/webhook), tier='anonymous', echoed env (rule 11), and the cohort marker on the name. Per-service extras: storage mode, vector pgvector extension, queue auth_mode. - Cohort-safe + reaped (rule 24): ledger-before-assert, inline reap on the happy path, afterAll backstop, and the out-of-process reap-cohort.ts in CI teardown. Anon 24h TTL is a backstop we never rely on. - Gated behind E2E_LIVE=1; per-service 503 skips loudly. Named live-*.spec.ts so the default mocked config testIgnores it, the live config testMatches it, and `npm run reap:live` + the e2e-live workflow pick it up with no config or CI change. Verified: npm run gate green (tsc + build + 1115 vitest pass); live config lists 7 tests across 2 files; cleanly skips (6 skipped) when E2E_LIVE unset. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mastermanas805
enabled auto-merge (squash)
June 4, 2026 19:13
size-limit report 📦
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
W2 — Anonymous provisioning, real-backend E2E
Implements W2 from
docs/sessions/2026-06-04/USER-FLOW-INVENTORY-AND-TEST-MATRIX.md(§B1, §C1.S, W2 bullet 2): extends the merged WS1-P1 LIVE harness (#170) to cover every anonymous resource-provision flow end-to-end against the real backend./db/newis already covered bylive-provision-smoke.spec.ts. This PR adds the six remaining anon flows so all seven services have a real-backend, cohort-safe, reaped LIVE spec.What's covered
e2e/live-anon-provision.spec.ts— registry-driven (rule 18), one test per service:/vector/newconnection_urlpostgres://+extension=pgvector/cache/newconnection_urlredis(s):///nosql/newconnection_urlmongodb(+srv):///queue/newconnection_urlnats://+auth_modepresent/storage/newconnection_urlhttp(s)/s3://+modepresent/webhook/newreceive_urlhttp(s)://.../webhook/receive/Each test asserts
201+ usable connection/URL +tier='anonymous'+ echoedenv(rule 11) + the cohort marker on the provisioned name.Cleanup guarantee (rule 24)
afterAllreaps any still-ledgered entity on a thrown assertion; the out-of-processreap-cohort.tsre-runs the same deletion in CI teardown if the process dies.Gating / CI
E2E_LIVE=1; per-service503(backend disabled in the stack) skips loudly, never a false red.live-*.spec.tsso the default mocked configtestIgnores it (per-PR CI never needs a live backend), the live configtestMatches it, andnpm run reap:live+ thee2e-liveworkflow pick it up with zero config/CI change.Flag note
Test-only specs (no product behavior), gated by
E2E_LIVEso they can't run accidentally — the flag-protection DoD rule doesn't require a feature flag here.Verification
npm run gateGREEN — tsc clean, build OK, 1115 vitest pass / 3 skipped (existing mocked suite intact).E2E_LIVEunset.🤖 Generated with Claude Code